import React from 'react';
import { getUserInfo, signout } from '../store/user';
import { withRouter } from 'react-router-dom';
import { connect } from 'react-redux';
import Navbar from '../components/Navbar';
const mapStateToProps = state => ({
  logged: state.user.logged,
  userInfo: state.user.userInfo
});
const mapDispatchToProps = {
  getUserInfo,
  signout
};
export default withRouter(
  connect(
    mapStateToProps,
    mapDispatchToProps
  )(Navbar)
);
